using System.Collections;
using UnityEngine;

public class DestroyItemController : MonoBehaviour
{
	private void Start()
	{
		UnityEngine.Object.Destroy(base.gameObject, 10f);
		Invoke("ItemSapMat", 7f);
	}

	private void ItemSapMat()
	{
		StartCoroutine(ItemNhapNhay());
		Invoke("ItemSapMat", 0.5f);
	}

	private IEnumerator ItemNhapNhay()
	{
		GetComponent<tk2dSprite>().color = new Color(1f, 1f, 1f, 0.6f);
		yield return new WaitForSeconds(0.2f);
		GetComponent<tk2dSprite>().color = new Color(1f, 1f, 1f, 1f);
	}
}
